package com.awphone.exceptions;

import com.awphone.utils.json.IJsonObject;
import com.google.gson.JsonObject;

/**
 * @author a_polyakov
 */
public abstract class AbstractException extends Exception implements IJsonObject {

    protected AbstractException(String message) {
        super(message);
    }

    @Override
    public JsonObject toJsonObject() {
        final JsonObject jsonObject = new JsonObject();
        jsonObject.addProperty("message", getMessage());
        return jsonObject;
    }
}
